<%@ page import="com.hline.kbcss.MyDriver"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%
String likes="";
Statement st12=MyDriver.getConnection("READ");
						 ResultSet rs12=st12.executeQuery("select likes from user where userid=62");
						while(rs12.next())
						  {
							  likes=rs12.getString("likes");
						  }
						  out.println("likes :"+likes);

						  StringTokenizer stringTokenizer = new 
   StringTokenizer(likes,",");
 out.println("The total no. of tokens generated :  " + stringTokenizer.countTokens());
Statement st1=MyDriver.getConnection("READ"); 
  while(stringTokenizer.hasMoreTokens()){
	
	  
					 ResultSet rs1=st1.executeQuery("select * from articles where field like '%"+stringTokenizer.nextToken()+"%'");
					 while(rs1.next())
	  {
						 String title=rs1.getString("title");	
						 out.println("----"+title);
						 String date=rs1.getString("postedon");
						 out.println("+++"+date);
	  }
  out.println("executed");
  }
						  %>
